• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

python algorithm

문자열 조작 6 - Longest Palindromic Substring

My Answer 1: Time Limit Exceeded (177 / 177 test cases passed, but took too long.) 문자열을 하나씩 뜯어서 p 에 붙여줌 => substring p 가 더 긴 palindrome 이면 self.ans update 더 빠르게 하기 위해서 if len(s[i:]) > len(self.ans): 추가 => 지금 확인할 문자열이 ans...

python algorithmpython algorithm

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more